<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        body{
            margin: 0px;
        }
        .input{
            width: 90%;
            height: 100px;
            margin: 5px 5% 0px 5%;
        }
        input::-webkit-input-placeholder {
            /* placeholder颜色  */
            color: #666;
            /* placeholder字体大小  */
            font-size: 12px;
            /* placeholder位置  */
            text-align: right;
        }
    </style>
</head>
<body>
<input id="input" class="input">
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script>

    $(function (){
        $("#input").on("input propertychange",function () {
            $("#output").text(unescape(unescape($("#input").val()).replace(/\\/g, "%")))

            var dom=unescape(unescape($("#input").val()).replace(/\\/g, "%"));
            const input = document.createElement('input');
            document.body.appendChild(input);
            input.setAttribute('value', dom);
            input.select();
            if (document.execCommand('copy')) {
                document.execCommand('copy');
                console.log('复制成功');
            }
            document.body.removeChild(input);
        })
    })
</script>
</html>